﻿Imports System
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Runtime.Serialization
Imports System.Workflow.ComponentModel
Imports System.Workflow.ComponentModel.Design

Namespace System.Workflow.Activities
    <Serializable> _
    Friend NotInheritable Class IfElseToolboxItem
        Inherits ActivityToolboxItem
        ' Methods
        Public Sub New(ByVal type As Type)
            MyBase.New(type)
        End Sub

        Private Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
            Me.Deserialize(info, context)
        End Sub

        Protected Overrides Function CreateComponentsCore(ByVal designerHost As IDesignerHost) As IComponent()
            Dim activity As CompositeActivity = New IfElseActivity { _
                .Activities = { New IfElseBranchActivity, New IfElseBranchActivity } _
            }
            Return New IComponent() { activity }
        End Function

    End Class
End Namespace

